﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
using ObjectLayer;

namespace BSC
{
    public partial class login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        [DirectMethod]
        protected void login_click(object sender, DirectEventArgs e)
        {
            usersBO obj = CommonAccessLayer.usersDAO.Login(e.ExtraParams["user"], e.ExtraParams["pass"]);
            user_infoBO objInf = CommonAccessLayer.user_infoDAO.Login(e.ExtraParams["user"], e.ExtraParams["pass"]);
            if (obj != null)
            {
                Global.GlobalVariable.User = obj;
                Global.GlobalVariable.UserInfo = objInf;
                Response.Redirect("default.aspx");
            }
        }

    }
}
